package Controllers.GenericToolsForController;

public enum WorkerRolls {
	ICM_MANGER("1"),
	IE("2"),
	ADMINISTATION("3");
		
	 private String text;

	 WorkerRolls(String text) {
	    this.text = text;
	  }
	 
	 public String getText() 
	 {
		    return this.text;
	 }
	 public static WorkerRolls fromString(String text) 
	 {
		 if (text != null) 
		 {
		    for (WorkerRolls b : WorkerRolls.values()) 
		    {
		        if (text.equalsIgnoreCase(b.text)) 
		        {
		          return b;
		        }
		      }
		    }
		    return null;
	  }
	 public static String getWorkerRoleName(WorkerRolls role)
	 {
		 if(role == WorkerRolls.ADMINISTATION)
		 {
			 return "ADMINISTATION";
		 }
		 else  if(role == WorkerRolls.ICM_MANGER)
		 {
			 return "ICM_MANGER";
		 }
		return "IE"; 
		  
	 }
}
